package com.kakarote.admin.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.kakarote.admin.entity.PO.AdminLanguagePack;
import com.kakarote.admin.entity.VO.AdminLanguagePackVO;
import com.kakarote.core.entity.BasePage;
import com.kakarote.core.servlet.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 语言包表 Mapper 接口
 * </p>
 *
 * @author zmj
 * @since 2020-12-02
 */
public interface AdminLanguagePackMapper extends BaseMapper<AdminLanguagePack> {

    /**
     * 查询用户可见语言包列表
     *
     * @param page 分页参数
     * @return data
     */
    @InterceptorIgnore(tenantLine = "true")
    BasePage<AdminLanguagePackVO> queryLanguagePackList(BasePage<AdminLanguagePackVO> page, @Param("type") Integer type);

    /**
     * 查询默认类型语言包
     *
     * @return data
     */
    @InterceptorIgnore(tenantLine = "true")
    AdminLanguagePack queryLanguagePack(@Param("type") Integer type, @Param("name") String languagePackName);

    /**
     * 根据id查询语言包
     *
     * @return data
     */
    @InterceptorIgnore(tenantLine = "true")
    AdminLanguagePack queryLanguagePackById(@Param("id") Long id);

    /**
     * 根据名称类型查询语言包
     *
     * @return data
     */
    @InterceptorIgnore(tenantLine = "true")
    List<AdminLanguagePack> queryLanguagePackByName(@Param("name") String name, @Param("type") Integer type);

    /**
     * 根据名称类型查询语言包
     *
     * @return data
     */
    @InterceptorIgnore(tenantLine = "true")
    AdminLanguagePack queryLastLanguagePackByName(@Param("name") String name, @Param("type") Integer type);
}
